


def test(strs: [str]) -> str:
    if len(strs) == 0:
        return ''
    prefix = strs[0]
    for index,element in enumerate(strs):
        if(index == 0):
            continue
        while(strs[index].find(prefix) != 0):
            prefix = prefix[0:len(prefix)-1]
            if(prefix == ''):
                return ''

    return prefix


def isValid(s: str) -> bool:
        while '{}' in s or '()' in s or '[]' in s:
            s = s.replace('{}', '')
            s = s.replace('[]', '')
            s = s.replace('()', '')
        return s == ''



if __name__ == '__main__':
    a = 'aaaba'.find('ab')
    enu
    print(a)
